
const Sequelize = require('sequelize');

import sequelize from './db/sequelize';

/**
 * 单张图片实体
 */
const ProveCompany = sequelize.define('prove_companys', {
  id                    : {type: Sequelize.BIGINT,   allowNull: false, primaryKey: true, autoIncrement: true},
  uid                   : {type: Sequelize.STRING,   allowNull: false },
  
  name                  : {type: Sequelize.STRING,   allowNull: false },
  handle_code           : {type: Sequelize.STRING,   allowNull: false },

  type                  : {type: Sequelize.STRING,   allowNull: false },
  code                  : {type: Sequelize.STRING,   allowNull: false },
  img                   : {type: Sequelize.STRING,   allowNull: false },

  status                : {type: Sequelize.INTEGER,   allowNull: false , defaultValue : 1 },
  remark                : {type: Sequelize.STRING,   allowNull: true },

  ext                   : {type: Sequelize.TEXT,   allowNull: true },

  ctime                 : {type: Sequelize.INTEGER,   allowNull: true },
  htime                 : {type: Sequelize.INTEGER,   allowNull: true }

},
{
    charset: 'utf8'
});

ProveCompany.sync({force: false}).then(function(){});
export default ProveCompany;